package com.adt.studioms.om;

import java.util.Date;

import com.asao.baseware.core.om.Entity;

public class Operator extends Entity {
    public static final String ADMIN = "ADMIN";
    public static final String USER = "USER";
    
    String code;
    String loginName;
    String password;
    String role;
    String phone;
    String address;
    Long dateOfBirth;
    Long dateOfMarriage;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    
    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Long getDateOfBirth() {
        return dateOfBirth;
    }
    
    public Date getFormattedDateofBirth() {
        return dateOfBirth!=null ? new Date(dateOfBirth) : null;
    }

    public void setDateOfBirth(Long dateOfBirth) {
        this.dateOfBirth = dateOfBirth;
    }

    public Long getDateOfMarriage() {
        return dateOfMarriage;
    }
    
    public Date getFormattedDateofMarriage() {
        return dateOfMarriage!=null ? new Date(dateOfMarriage) : null; 
    }

    public void setDateOfMarriage(Long dateOfMarriage) {
        this.dateOfMarriage = dateOfMarriage;
    }
}
